package audi.a4.control.gui;

import java.awt.Dimension;

import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;

public class CanCodePanel extends JScrollPane {

	public CanCodePanel(JPanel content) {
		super(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
		setViewportView(content);
		getVerticalScrollBar().setUnitIncrement(20);
		updateScroller(720,480);
	}
	public void updateScroller(int w, int h){

		setPreferredSize(new Dimension(	w,
										h)
									  );
		setSize(new Dimension(	w-10,
								h-10));
		//invalidate();
		//repaint();
		//setVisible(true);
	}

	/**
	 * long 
	 */
	private static final long serialVersionUID = 6216602219141004029L;

}
